package com.contract.spirit.ui.splash

import androidx.lifecycle.MutableLiveData
import com.contract.commonlib.http.status.ResultState
import com.contract.commonlib.base.BaseViewModel
import com.contract.commonlib.http.ext.request
import com.contract.spirit.bean.response.VersionInfoResponse
import com.contract.spirit.func.net.rxApi

/**
 * @author: witness
 * created: 2021/9/18
 * desc:
 */
class SplashViewModel : BaseViewModel() {
    val versionInfoResponse = MutableLiveData<ResultState<VersionInfoResponse>>()
    fun checkAppUpdate() {
        request({ rxApi.checkAppUpdate() }, versionInfoResponse, false)
    }
}